package com.zzzy.common.exception;

import com.zzzy.common.enums.ResultCodeEnum;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException{

    private String code;
    private String message;

    public BusinessException(String message) {
        this.code = ResultCodeEnum.BUSINESS_ERROR.getCode();
        this.message = message;
    }
    public BusinessException(ResultCodeEnum resultCodeEnum) {
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
    public BusinessException(String message, Throwable cause) {
        super(cause);
        this.message = message;
    }

}
